package libs.yzx.zaza;

import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.graphics.drawable.DrawableCompat;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;

/**
 * Created by Administrator on 2016/7/29
 */
public class TintActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Drawable drawable = getResources().getDrawable(R.mipmap.ic_launcher);
        Drawable wrapDrawable = DrawableCompat.wrap(drawable);
        DrawableCompat.setTint(drawable, Color.BLUE);

        ImageView iv = new ImageView(this);
        iv.setImageDrawable(drawable);
        setContentView(iv);

    }

}
